﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PR_SalaryPromotionBaseConfig.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.PR_SalaryPromotionBaseConfig" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <script type="text/javascript">   
          function isNumberKey(event)  // ตัวเลขอย่างเดียว
          {
             var charCode = (event.which) ? event.which : event.keyCode
             if(charCode > 31 && (charCode < 48 || charCode > 57)){
                 alert("กรุณากรอกเฉพาะตัวเลข !!")
                 return false;
	          }
             return true;
          }
          function isNumberKeyDot(event)  // ตัวเลขทศนิยม
          {
             var charCode = (event.which) ? event.which : event.keyCode
             if(charCode > 31 && (charCode < 48 || charCode > 57) && charCode != 46){
                 alert("กรุณากรอกเฉพาะตัวเลข !!")
                 return false;
	          }
             return true;
          }
           function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
          } 
            function openProjectDetails(id)
            {
                radopen("PR_SalaryDetail.aspx?id=" + id , "ProjectDtls");
                 return false;

                //maximunWindow();
            }
</script>

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>
    
    
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
    <telerik:RadWindow 
        id="ProjectDtls" 
        runat="server"
        showcontentduringload="false"
        VisibleStatusbar="false"
        title=""
        width="800px"
        Height="600px"        
        Modal="true"
        behaviors="Close">
    </telerik:RadWindow>
</Windows>

        <Windows>
            <telerik:RadWindow 
                ID="RadWindow1"  
                DestroyOnClose = "true"               
                Modal ="true"                
                VisibleStatusbar ="false"
                runat="server">
            </telerik:RadWindow>
        </Windows>


</telerik:RadWindowManager>
    
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" /> 
    
       <%-- <div class="moduleDivSlim780">
        <div class="moduleDivBottom780">--%>
       <div class ="moduleDivBold850Left">
        <asp:Panel ID="NestedViewPanel" runat="server" Height="400px" Width="846px">
        <table align="center" width ="770px" >
        <tr>
            <td align="left" class="tableHeader">
             กำหนดฐานในการคำนวณและช่วงเงินเดือนสำหรับการเลื่อนเงินเดือน
             <asp:Label ID="lblPrm_seq" runat="server" Text="Prm_seq" Visible="False"></asp:Label>
            </td>
        </tr>
        </table>
        <table width ="760px" align="center">
        <tr>
        <td >
        <asp:Panel ID="PanelGrid" 
            runat="server"  
            Height="360px" ScrollBars="Auto" Width="800px" >
                <telerik:RadGrid ID="RadGrid2" runat="server" 
                    AllowFilteringByColumn="True" 
                    AllowAutomaticDeletes="True"
                    AllowMultiRowEdit="True" AllowMultiRowSelection="True" AllowPaging="True" 
                    AllowSorting="True" AutoGenerateColumns="False" EnableAJAX="True" 
                    EnableAJAXLoadingTemplate="True" GridLines="None" 
                    OnItemCommand="RadGrid2_ItemCommand" Skin="Outlook" 
                    Width="750px"
                    GroupingSettings-GroupByFieldsSeparator = "&nbsp;&nbsp;&nbsp;&nbsp;"
                    GroupingSettings-GroupContinuedFormatString = ""
                    GroupingSettings-GroupContinuesFormatString = ""
                    GroupingSettings-GroupSplitFormat = ""
                    onitemdatabound="RadGrid2_ItemDataBound">
                    <MasterTableView 
                        AllowMultiColumnSorting="True" 
                        CellSpacing="-1" 
                        ClientDataKeyNames="prm_base_seq"
                        CommandItemDisplay="Top"
                        DataKeyNames="prm_base_seq" 
                        InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                        NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                        <CommandItemTemplate>
                            <table width="100%">
                                <tr>
                                    <td>
                                        <asp:LinkButton ID="cmdAddNew" runat="server" CausesValidation="False" 
                                            CommandName="InitInsert" 
                                            Visible="<%# !RadGrid2.MasterTableView.IsItemInserted && RadGrid2.EditIndexes.Count <= 0 %>"> <img alt="" src="../Images/Buttons/AddRecord.gif" 
                                            style="border: 0px; vertical-align: middle;" /> เพิ่มข้อมูลใหม่</asp:LinkButton>
                                        &nbsp;&nbsp;
                                    </td>
                                    <td align="right">
                                    </td>
                                </tr>
                            </table>
                        </CommandItemTemplate>
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
  
                        <ExpandCollapseColumn Visible="True">
                        </ExpandCollapseColumn>
                        <GroupByExpressions>
                            <telerik:GridGroupByExpression>
                                <GroupByFields>
                                    <telerik:GridGroupByField 
                                        FieldName="pos_type_name" 
                                        HeaderText="Group" />
                                </GroupByFields>
                                <SelectFields>
                                    <telerik:GridGroupByField 
                                        FieldName="pos_type_name" 
                                        HeaderText="ตำแหน่งประเภท" 
                                        HeaderValueSeparator = " " />
                                </SelectFields>
                            </telerik:GridGroupByExpression>
                        </GroupByExpressions> 
                        <Columns>
                            <telerik:GridEditCommandColumn 
                             EditText = "คลิกเพื่อแก้ไขรายการ"
                                        ButtonType="ImageButton">
                                        <HeaderStyle HorizontalAlign="Center" Width="15px" />
                                        <ItemStyle HorizontalAlign="Center" Width="15px" />
                                      
                            </telerik:GridEditCommandColumn>
                            
                            <telerik:GridButtonColumn ButtonType="ImageButton" 
                                CommandName="Delete" 
                                ConfirmDialogType="RadWindow" ConfirmText="ลบข้อมูลที่เลือก?" 
                                Text="คลิกเพื่อลบข้อมูล" 
                                UniqueName="column1">
                                <HeaderStyle HorizontalAlign="Center" Width="10px" />
                                <ItemStyle HorizontalAlign="Center" Width="10px" />
                            </telerik:GridButtonColumn>
                               
                            <telerik:GridTemplateColumn
                                DataField="class_name"
                                HeaderText="ระดับตำแหน่ง" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                UniqueName="class_name">
                                   <ItemTemplate>
                                    <%# Eval("class_name")%>                        
                                             </ItemTemplate>
                                <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                            </telerik:GridTemplateColumn>
                            
                            <telerik:GridTemplateColumn
                                DataField="sal_between" 
                                HeaderText="ช่วงเงินเดือน" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                UniqueName="sal_between" >
                                <ItemTemplate>
                                    <%# Eval("sal_min", "{0:N0}")%>  -  <%# Eval("sal_max", "{0:N0}")%>                      
                                </ItemTemplate>                                 
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn
                                DataField="sal_level_name"
                                HeaderText="ระดับ<br>ฐานในการคำนวณ" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                UniqueName="sal_level_name">
                                <ItemTemplate>
                                    <%# Eval("sal_level_name")%>                        
                                </ItemTemplate>
                           </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn
                                DataField="sal_base"
                                HeaderText="อัตรา<br>ฐานในการคำนวณ" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                UniqueName="sal_base">
                                <ItemTemplate>
                                    <%# Eval("sal_base", "{0:N0}")%>                        
                                </ItemTemplate>
                           </telerik:GridTemplateColumn>
                            
                           <telerik:GridTemplateColumn Visible ="false"
                                DataField="sal_min" 
                                HeaderText="ฐานในการคำนวณล่าง" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                UniqueName="sal_min">
                                <ItemTemplate>
                                    <%# Eval("sal_min", "{0:N0}")%>                        
                                </ItemTemplate>                                             
                           </telerik:GridTemplateColumn>
                           
                           <telerik:GridTemplateColumn Visible ="false"
                                DataField="sal_max" 
                                HeaderText="ฐานในการคำนวณบน" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                UniqueName="sal_max">
                                <ItemTemplate>
                                    <%# Eval("sal_max", "{0:N0}")%>                        
                                </ItemTemplate>                                             
                           </telerik:GridTemplateColumn>
                           
                           <telerik:GridTemplateColumn Visible ="false"
                                DataField="sal_extra_base" 
                                HeaderText="เงินเดือนพิเศษ" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                UniqueName="sal_extra_base">
                                <ItemTemplate>
                                    <%# Eval("sal_extra_base", "{0:N0}")%>                        
                                </ItemTemplate>                                             
                           </telerik:GridTemplateColumn>                                   
                        </Columns>                       
                        
                        <EditFormSettings EditFormType="WebUserControl" 
                            UserControlName="../UserControls/PR_SalaryPromotionBaseConfig.ascx">
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    </MasterTableView>
                    <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" 
                        EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                        <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                    </ClientSettings>
                </telerik:RadGrid>
            </asp:Panel>
        </td>
        </tr>
        </table>
        </asp:Panel>
        </div>
</form>
</body>
</html>
